<template>
  <!-- 顶部组件 -->
  <AppNavbar />
  <!-- /顶部组件 -->

  <!-- 吸顶头部 -->
  <AppHeaderSticky />
  <!-- /吸顶头部 -->

  <!-- 头部组件 -->
  <AppHeader />
  <div class="app-body">
    <router-view />
  </div>
  <!-- /头部组件 -->

  <!-- 底部组件 -->
  <AppFooter />
  <!-- /底部组件 -->
</template>

<script>
import AppNavbar from '@/components/app-navbar'
import AppHeader from '@/components/app-header'
import AppFooter from '@/components/app-footer'
import AppHeaderSticky from '@/components/app-header-sticky'
import { useStore } from 'vuex'

export default {
  name: 'Layout',
  components: {
    AppNavbar,
    AppHeader,
    AppFooter,
    AppHeaderSticky
  },
  setup () {
    const store = useStore()
    store.dispatch('category/getList')
  }
}
</script>

<style lang="less" scoped>
.app-body {
  min-height: 600px;
}
</style>
